package com.wslNB.goods.myException;


import com.wslNB.entity.Result;
import com.wslNB.entity.StatusCode;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

/**
 * 异常处理类
 */
@RestControllerAdvice
public class BaseExceptionHandler {

    @ExceptionHandler(Exception.class)
    public Result error(Exception ex){
        ex.printStackTrace();
        return new Result(false, StatusCode.ERROR,"异常抓取");
    }
}
